package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * CollectTask entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "COLLECT_TASK")
public class CollectTask implements java.io.Serializable, Cloneable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -3796990474827404567L;

    // Fields
    private Long id;
    private Long resTypeTaskId;
    private Long resId;
    private Long resTypeId;
    private Long collectorId;
    private Integer status;
    private Integer isSave;
    private Integer isBatch;
    private Long childResTypeId;

    // Constructors

    /** default constructor */
    public CollectTask() {
    }

    /** minimal constructor */
    public CollectTask(Long id) {
        this.id = id;
    }

    /** full constructor */
    public CollectTask(Long id, Long resTypeTaskId, Long resId, Long resTypeId, Long collectorId, Integer status, Integer isSave, Integer isBatch, Long childResTypeId) {
        this.id = id;
        this.resTypeTaskId = resTypeTaskId;
        this.resId = resId;
        this.resTypeId = resTypeId;
        this.collectorId = collectorId;
        this.status = status;
        this.isSave = isSave;
        this.isBatch = isBatch;
        this.childResTypeId = childResTypeId;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "COLLECT_TASK_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_TYPE_TASK_ID", precision = 18, scale = 0)
    public Long getResTypeTaskId() {
        return this.resTypeTaskId;
    }

    public void setResTypeTaskId(Long resTypeTaskId) {
        this.resTypeTaskId = resTypeTaskId;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "RES_TYPE_ID", precision = 18, scale = 0)
    public Long getResTypeId() {
        return this.resTypeId;
    }

    public void setResTypeId(Long resTypeId) {
        this.resTypeId = resTypeId;
    }

    @Column(name = "COLLECTOR_ID", precision = 18, scale = 0)
    public Long getCollectorId() {
        return this.collectorId;
    }

    public void setCollectorId(Long collectorId) {
        this.collectorId = collectorId;
    }

    @Column(name = "STATUS", precision = 1, scale = 0)
    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "IS_SAVE", precision = 1, scale = 0)
    public Integer getIsSave() {
        return this.isSave;
    }

    public void setIsSave(Integer isSave) {
        this.isSave = isSave;
    }

    @Column(name = "IS_BATCH", precision = 1, scale = 0)
    public Integer getIsBatch() {
        return this.isBatch;
    }

    public void setIsBatch(Integer isBatch) {
        this.isBatch = isBatch;
    }

    @Column(name = "CHILD_RES_TYPE_ID", precision = 18, scale = 0)
    public Long getChildResTypeId() {
        return this.childResTypeId;
    }

    public void setChildResTypeId(Long childResTypeId) {
        this.childResTypeId = childResTypeId;
    }

    @Override
    public String toString() {
        return "CollectTask [id=" + id + ", resTypeTaskId=" + resTypeTaskId + ", resId=" + resId + ", resTypeId=" + resTypeId + ", collectorId=" + collectorId + ", status=" + status + ", isSave=" + isSave + ", isBatch=" + isBatch + ", childResTypeId=" + childResTypeId + "]";
    }

    @Override
    public CollectTask clone() throws CloneNotSupportedException {
        CollectTask testClone = null;
        try {
            testClone = (CollectTask) super.clone();
            testClone.setId(null);
            testClone.setResTypeId(null);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return testClone;

    }

}